<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Clojure documentation browser</title><style>
.library
{
  padding: 0.5em 0 0 0 
}
.all-libs-toggle,.library-contents-toggle
{
 font-size: small;
}
.all-libs-toggle a,.library-contents-toggle a
{
 color: white
}
.library-member-doc-whitespace
{
 white-space: pre
}
.library-member-source-toggle
{
  font-size: small;
  margin-top: 0.5em
}
.library-member-source
{
  display: none;
  border-left: solid lightblue 
}
.library-member-docs
{
  font-family:monospace
}
.library-member-arglists
{
  font-family: monospace
}
.library-member-type
{
  font-weight: bold; 
  font-size: small;
  font-style: italic;
  color: darkred
}
.lib-links
{
  margin: 0 0 1em 0
}

.lib-link-header
{
  color: white;
  background: darkgreen;
  width: 100%
}

.library-name 
{ 
  color: white;
  background: darkblue;
  width: 100%
}

.missing-library
{
  color: darkred; 
  margin: 0 0 1em 0 
}

.library-members
{
  list-style: none
}

.library-member-name
{
  font-weight: bold;
  font-size: 105%
}</style><script language="JavaScript" type="text/javascript"> // <![CDATA[

function getElem(id)
{
  if( document.getElementById )
  {
    return document.getElementById( id )
  }
  else if ( document.all )
  {
    return eval( 'document.all.' + id )
  }
  else
    return false;
}

function setDisplayStyle(id,displayStyle)
{
  var elem = getElem (id)
  if (elem)
  {
    elem.style.display = displayStyle
  }

}

function setLinkToggleText (id, text)
{
 var elem = getElem (id)
 if (elem)
 {
   elem.innerHTML = text
 }
}

function collapse(id)
{
  setDisplayStyle (id, 'none')
}

function expand (id)
{
  setDisplayStyle (id, 'block')
}

function toggleSource( id )
{
  toggle(id, 'linkto-' + id, 'Hide Source', 'Show Source')
}

function toggle(targetid, linkid, textWhenOpen, textWhenClosed)
{
  var elem = getElem (targetid)
  var link = getElem (linkid)

  if (elem && link)
  {
    var isOpen = false
    if (elem.style.display == '')
    {
      isOpen = link.innerHTML == textWhenOpen
    }
    else if( elem.style.display == 'block' )
    {
      isOpen = true
    }
    
    if (isOpen)
    {
      elem.style.display = 'none'
      link.innerHTML = textWhenClosed
    }
    else
    {
      elem.style.display = 'block'
      link.innerHTML = textWhenOpen
    }
  }
}

      //]]>
</script><script language="JavaScript" type="text/javascript">// <![CDATA[!
function expandAllNamespaces()
{
expand(&apos;library-contents-appli.server&apos;);
setLinkToggleText(&apos;library-contents-toggle-appli.server&apos;, &apos;-&apos;);

}function collapseAllNamespaces()
{
collapse(&apos;library-contents-appli.server&apos;);
setLinkToggleText(&apos;library-contents-toggle-appli.server&apos;, &apos;+&apos;);

}
// ]]></script></head><body><div class="lib-links"><div class="lib-link-header">Namespaces<span class="all-libs-toggle"> [ <a href="javascript:expandAllNamespaces()">Expand All</a> ] [ <a href="javascript:collapseAllNamespaces()">Collapse All</a> ]</span></div><a class="lib-link" href="#library-appli.server">appli.server</a></div><div class="library"><a name="library-appli.server"/><div class="library-name"><span class="library-contents-toggle">[ <a id="library-contents-toggle-appli.server" href="javascript:toggle(&apos;library-contents-appli.server&apos;, &apos;library-contents-toggle-appli.server&apos;, &apos;-&apos;, &apos;+&apos;)">-</a> ] </span>appli.server</div><div class="library-contents" id="library-contents-appli.server"><div class="library-member-links"><a class="lib-member-link" href="#member-appli.server-*port*">*port*</a> <a class="lib-member-link" href="#member-appli.server-serverLoop">serverLoop</a> <a class="lib-member-link" href="#member-appli.server-write">write</a></div><ol class="library-members"><li class="library-member"><a name="member-appli.server-*port*"/><dl class="library-member-table"><dt class="library-member-name">*port*</dt><dd><div class="library-member-info"><span class="library-member-type">var</span> <span class="library-member-arglists"></span></div><div class="library-member-docs"/><div class="library-member-source-section"><div class="library-member-source-toggle">[ <a href="javascript:toggleSource(&apos;membersource-appli.server-*port*&apos;)" id="linkto-membersource-appli.server-*port*">Show Source</a> ]</div><div class="library-member-source" id="membersource-appli.server-*port*"><pre>	&quot;probando&quot;</pre></div></div></dd></dl></li><li class="library-member"><a name="member-appli.server-serverLoop"/><dl class="library-member-table"><dt class="library-member-name">serverLoop</dt><dd><div class="library-member-info"><span class="library-member-type">fn</span> <span class="library-member-arglists">([])</span></div><div class="library-member-docs"/></dd></dl></li><li class="library-member"><a name="member-appli.server-write"/><dl class="library-member-table"><dt class="library-member-name">write</dt><dd><div class="library-member-info"><span class="library-member-type">fn</span> <span class="library-member-arglists">([_ socketClient])</span></div><div class="library-member-docs"/><div class="library-member-source-section"><div class="library-member-source-toggle">[ <a href="javascript:toggleSource(&apos;membersource-appli.server-write&apos;)" id="linkto-membersource-appli.server-write">Show Source</a> ]</div><div class="library-member-source" id="membersource-appli.server-write"><pre>

(defn write
  &quot;Writes in server DB. Receives one parameter: the socket of the Client.&quot;	
  [_ socketClient]
  (loop []
		  (let [
				input		(DataInputStream. (.getInputStream socketClient))
				output		(DataOutputStream. (.getOutputStream socketClient))
				db        	(atom &quot;db-1x2.db&quot;)
				elementsArr	(.split (.readUTF input) &quot;#&quot;)
				get-pos		(aget elementsArr 0)
				name		(aget elementsArr 1)
				location 	(aget elementsArr 2)
				size     	(aget elementsArr 3)
				smoking  	(aget elementsArr 4)
				rate     	(aget elementsArr 5)
				date     	(aget elementsArr 6)
				owner    	(aget elementsArr 7)
				agent		(agent nil)
			]
			(write-row-with-values @db (Integer. get-pos) name location size smoking rate date owner)
			(println (str &quot;Received to write from: &quot; (.getRemoteSocketAddress socketClient)))
			(println get-pos)
			(println name)
			(println location)
			(println size)
			(println smoking)
			(println rate)
			(println date)
			(println owner)
		  )
		(recur)
	)
)</pre></div></div></dd></dl></li></ol></div></div></body></html>